In this section we describe common principles of IR data communication. Starting from the physical properties of infrared light we will give an overview how it is used to transfer information over the air. As a common example we will deeply investigate the NEC protocol which was also used to built up a device for selective jamming of infrared transmitters.

\subsection{Infrared}

Infrared light is an electro-magnetic radiation whose wave-length ranges from 0.74 to 300$\mu m$. This corresponds to a frequency range between 1 and 400$THz$, which is lower than the frequencies of visible light and higher than those of micro-waves. The beams carry much of the heat emitted by objects near room-temperature while being able to propagate through a vacuum. The technology is applied in a wide range of scenarios. To name just a few according to \cite{wiki-ir-basics}: astronomy, wheather forecasting, and finally, communications. Different regions of infrared light can be sub-divided out of the whole frequency range. Table \ref{tab:ir} shows such a common sub-division scheme, taken from \cite{ir-classification} with a special focus on communication.

\begin{table}[h]
\centering
\begin{tabularx}{\textwidth}[h]{|l|l|X|}
\hline
\textbf{Division Name} & \textbf{Wave-Length} & \textbf{Application} \\
\hline
\hline
Near-Infrared   & 0.75-1.4$\mu m$   &   fiber-optics communication,\newline \emph{consumer IR} \\
\hline
Short-wavelength infrared   & 1.4-3$\mu m$  & long-distance communication \\
\hline
Mid-wavelength infrared     & 3-8$\mu m$    & passive IR 'heat seeking'\newline missiles \\
\hline
Long-wavelength infrared    & 8-15$\mu m$   & environmental monitoring\newline ("night vision") \\
\hline
Far infrared    & 15-1000$\mu m$    & Terahertz imaging \\
\hline
\end{tabularx}
\caption{Common sub-division of the infrared light spectrum}
\label{tab:ir}
\end{table}

For our project it is essential to have a special look at Near-Infrared (NI) and its properties. NI beams share much of their properties with visible light like the ability to propagate through certain materials. It is also reflected by certain materials, whereas smooth surfaces reflect better than rude ones. Finally one can say that for reliable communications a line-of-sight connection is indispensable, although making use of reflection could work under certain circumstances.
When it comes to data transmission most techniques focus on simple transmission using a single wave-length, such that there is only one IR emitter necessary. Bits can be encoded with on-off-keying. In the following we give an overview of some communication protocols and their respective concepts. For further information one can refer to \cite{ir-basics}.

\subsection{Protocols}\label{sec:protocols}

There are a bunch of protocols for infrared data transmission. In the scope of this project we will only cover those used in consumer IR products. Of course, there are other applications like free-space optical communication which usually connects Local Area Networks with data rates up to 2.5$\frac{Gbit}{s}$. We will have a look at protocols with much lower data rates.
When it comes to consumer IR devices, there is a large number of different protocols. Nearly every big electronics company has developed its own. To name a few of them there are protocols by Sony, NEC, Apple, Philips (RC-5). They all have in common that they use pulse width modulation with a carrier frequency between 38 and 42kHz. The pulse width modulation hardens the signal against inteferences. In fact, there are just two different symbols: bursts and non-bursts. During a burst the infrared emitter is turned on and off within the carrier frequency, while during non-bursts it is just turned off. A burst period usually takes between 100$\mu s$ and 600$\mu s$. 
The data transmitted is encapsulated into a data frame which usually has some \emph{start of frame} and \emph{end of frame} indicator. Each protocol carries 8 to 32 data bits per frame, whereas the frame size is always fixed. The data bits are oftenly divided into address bits and command bits. There are no complex error correction mechanisms like CRC. Some protocols send redundant bits or the logical inverse to detect transmission faults.

\subsection{NEC in detail}

The NEC consumer IR protocol is proprietary like most of its relatives. Some effort has been spent in reverse engineering the protocol. The outcome can be inspected in some data sheet of an electronics reseller, \cite{sunrom}, the IRMP source code, \cite{IRMP}, or various web sites like \cite{sbproj}. Some timings differ in the magnitude of 1ms, which can be seen as tolerance when it comes to the practical implementation. A specification of the protocol which is one hundred percent correct is not publicly accessible hence not available to us. In the following we will provide the detailed specification as stated in \cite{sunrom}. The single bits transmitted are encoded via pulse width modulation. There are burst periods where the infrared emitter is switched on and off with a carrier frequency of 38kHz. Data bits are sent encoded:
\begin{itemize}
  \item "0" begins with a pulse of 562.5$\mu s$ length followed by an off-period with 562.5$\mu s$
  \item "1" begins with a pulse of 562.5$\mu s$ length followed by an off-period with 1.6875$ms$
\end{itemize}
Each data frame begins with a burst period of 9ms which follows an off-period (LED is off) of 4.5ms. Afterwards, the receiving device's 8-bit address and its logical inverse are emitted. Subsequently, the 8-bit command and its logical inverse are transmitted before finally, the frame ends with a 562.5$\mu s$ burst period. Hence, a frame contains 16 bits of information and lasts 67.5$ms$ which results in a data rate of 238$\frac{bit}{s}$. Furthermore there are repeat codes which will be sent if a command code should be sent more than once. The repeat code is sent every 108$ms$ after the beginning of the initial data packet and consists of a 562.5$\mu s$ burst period in addition to a 9$ms$ pulse burst following a 2.5$ms$ pause. This is depicted in figure \ref{fig:nec-rep}.

\begin{figure}[h]
\centering
\includegraphics[width=0.9\textwidth]{img/nec-repeat}
\caption{NEC protocol repetition frames.}
\label{fig:nec-rep}
\end{figure}
